import  request from "../utils/request"

/**
 * 分页获取文章列表
 * @param page 
 * @param size 
 * @returns 
 */
export const listArticles = function(page: number, size: number) {
  return request.get('/article/list/all', { params: {page: page, size: size} })
}

/**
 * 保存文章信息
 * @param articleForm 
 */
export const saveArticle = function(articleForm: any) {
  return request.post('/article/save', articleForm)
}

/**
 * 获取文章内容
 * @param id 
 */
export const getArticleContent = function(url: string) {
  return request.get(`/article/html?url=${url}`)
}